-
Notifications
You must be signed in to change notification settings - Fork 166
Fix AddExecutable compilation errors and improve API demonstration in 9.5 release post #4989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: IEvangelist <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the changes that should have been made.
At first, I assumed that all we needed to fix was adding the We already had finite control over executables, both the |
Ah, I see now... it's related to this dotnet/aspire#10649 |
Hey @copilot please update this pr, considering the related issue and the extended API, making it more obvious that this |
…Directory APIs Co-authored-by: IEvangelist <[email protected]>
Updated the examples to better demonstrate the fluent-mutable API:
Commit: Updated examples in the latest commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request fixes compilation errors in the Aspire 9.5 release documentation and improves the demonstration of new fluent API features. The issue was that code snippets for AddExecutable
were missing the required working directory parameter, causing compilation failures.
Key changes:
- Fixed compilation errors by providing the required third parameter to
AddExecutable
calls - Updated examples to better demonstrate the fluent-mutable nature of the new
WithCommand
andWithWorkingDirectory
APIs - Clarified the description text to emphasize the APIs enable "fluent, mutable configuration"
Summary
Fixes the code snippets in the "WithCommand and WithWorkingDirectory APIs" section of the Aspire 9.5 release post that were causing compilation errors, and updates examples to better demonstrate the fluent-mutable nature of these new APIs.
Problem
The code examples were calling
AddExecutable
with only 2 parameters (name and executable), but the API requires at least 3 parameters to compile:Error:
No overload for method 'AddExecutable' takes 2 arguments [CS1501]
Solution
Fixed the compilation errors and updated examples to better demonstrate that
WithCommand
andWithWorkingDirectory
enable fluent-mutable configuration of executable resources:First example - Sets working directory directly in
AddExecutable
:Second example - Demonstrates mutability by changing the working directory after initial setup:
This approach makes it clear that these APIs allow you to modify command and working directory after resource creation, which is valuable for scenarios where configuration needs to be adjusted dynamically (related to dotnet/aspire#10649).
Changes
AddExecutable
callsFixes #2975
Co-authored-by: IEvangelist [email protected]
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Internal previews